﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using Runda.CMS.Bll;
using Runda.CMS.Common.Entity;
using Runda.CMS.Common.Utility;
using System.Collections.Generic;
using Telerik.Web.UI;
using System.Text;

namespace Runda.CMS.Portal.SalesManage
{
    public partial class SalesZKSum : System.Web.UI.Page
    {
        public string billYear
        {
            get
            {
                if (Request.QueryString["billYear"] != null) return Request.QueryString["billYear"].ToString();
                else return "2012";
            }

        }
        public string company
        {
            get
            {
                if (Request.QueryString["company"] != null) return Request.QueryString["company"].ToString();
                else return "";
            }

        }
        
        
        protected void Page_Load(object sender, EventArgs e)
        {
            BindGrid(1);
           
        }
        protected void btnSearch_Click(object sender, EventArgs e)
        {
            BindGrid(1);
        }

        protected void btnRefershBillInfo_Click(object sender, EventArgs e)
        {
            
        }

        private void BindGrid(int pageindex)
        {
            string strsql = "";
            DataTable dt = new BillBll().SumSalesZK(strsql);

            gridAccessoryList.DataSource = dt;
            gridAccessoryList.DataBind();
        }

        

        protected void gridAccessoryList_SortCommand(object source, Telerik.WebControls.GridSortCommandEventArgs e)
        {
            string OrderBy = e.SortExpression + " " + (e.NewSortOrder == Telerik.WebControls.GridSortOrder.Ascending ? "asc" : "desc");
            BindGrid(1);
       
        }

        

        
    }
}
